%% How to run the Unit root models tutorial package
%
% This m-file describes the sequence of steps necessary to run the tutorial
% package on handling models with unit root variables, or balanced-growth
% path models.
%
% Hopefully, after going through this tutorial package, you will never
% stationarise your models again. It is a pain, and it is, as a matter of
% fact, _totally_ unnecessary.

%% One Model, Two Model Codes
%
% We have two versions of the same simple model (exogenous growth model).
% One version is stationarised (i.e. unit-root variables, such as output,
% are divided by the level of productivity). The other version has all the
% variables in their original levels, with the unit root preserved.

edit exog_growth_stationarised.model;
edit exog_growth_unit_root.model;

%% Create different versions of the same model
%
% We create and solve three model objects:
%
% * one stationarised model,
% * two unit-root models, each solved around a different point on the BGP.

read_models;

%% Compare shock simulations in stationarised and unit-root models
%
% We show that all the three models have the same shock responses.

compare_shock_simulations;

%% Compare shock simulations in stationarised and unit-root models
%
% We show that all the three models have the autocovariance functions.

compare_acf;

%% Compile PDFs
%
% The following commands have been used to create PDF versions of the model
% files and the m-files:

%{
latex.publish('read_me_first.m','read_me_first.pdf','evalCode',false);
latex.publish('exog_growth_stationarised.model');
latex.publish('exog_growth_unit_root.model');
latex.publish('read_models.m');
latex.publish('compare_shock_simulations.m');
latex.publish('compare_acf.m');
%}
